package top.soning.disk.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import top.soning.disk.entity.FileEntity;
import top.soning.disk.service.impl.FileUploadServiceImpl;



@RestController
public class FileUploaderController {
    @Autowired
    FileUploadServiceImpl fileUploadService;

    @PostMapping("/file")
    public FileEntity getFile(@RequestParam("file") MultipartFile file) {

//        Log4jLogger.info("log4j2 test date: {}  info: {}", LocalDate.now(), "请关注公众号：Felordcn");
        return  fileUploadService.start(file);
    }
}
